export interface IProps {
  global: any;
  buttonPermissions: any;
  powerForecast: any;
  menuCode: string;
  power: any;
  allKeys: any;
}

export interface IOptionType {
  label?: string;
  value?: string | number;
  children?: IOptionType[];
}

export interface IFormValue {
  provinceId?: string; // 省份ID
  stationIdList?: string[] | string; // 交易单元ID
  startDate?: string; // 开始时间
  endDate?: string; // 截止时间
  stationIds?: string[] | string; // 交易单元ID
  beginDate?: string; // 开始时间
  planState?: number; //计划状态
}
export interface IFormValue {
  marketId?: string; // 交易中心ID
  provinceId?: string; // 省份ID
  stationIdList?: string[] | string; // 交易单元ID
  startDate?: string; // 开始时间
  endDate?: string; // 截止时间
  stationIds?: string[] | string; // 交易单元ID
  beginDate?: string; // 开始时间
  planState?: number; //计划状态
  stationId?: string | number; // 交易单元ID
  dateStart?: string; // 开始时间
  dateEnd?: string; // 截止时间
}

export interface IOrginDealElementOptions {
  id?: number;
  label?: string;
  value?: string;
  children?: IOrginDealElementOptions[] | null;
}

export interface IOrginDealElementOptions {
  id?: number;
  label?: string;
  value?: string;
  children?: IOrginDealElementOptions[] | null;
}
export interface IDealElementOptions {
  id?: number;
  key?: string;
  label?: string;
  parentKey?: number;
  regionId?: string;
  title: string;
  value?: string;
  children?: IDealElementOptions[];
}

export interface IStationsDataType {
  dealElementOptions: IDealElementOptions[];
  dealElementModalOptions: IDealElementOptions[];
  allKeys: [];
}

export type IDealElementDataObj = Record<number, IDealElementOptions[]>;

export interface IIsErrorType {
  predictivePowerIsError?: boolean; // 预测功率
  maintenanceScheduleIsError?: boolean; // 检修计划表
  yearlyMaintenancePlansDateIsError?: boolean; // 检修计划格子图
}

export interface IIsLoadingType {
  predictivePowerIsLoading?: boolean; // 预测功率
  maintenanceScheduleIsLoading?: boolean; // 检修计划表
  yearlyMaintenancePlansDateIsLoading?: boolean; // 检修计划格子图
}

export enum ITitleType {
  PREDICTIVE_POWER = 'predictivePower', // 预测功率
  MAINTENANCE_SCHEDULE_AFFECTS_POWER = 'maintenanceScheduleAffectsPower', // 检修计划影响功率
  MAINTENANCE_SCHEDULE = 'maintenanceSchedule', // 检修计划表
  DEVIATION_INDEX = 'deviationIndex', // 偏差指数
  DEVIATION_POWER = 'deviationPower', // 偏差功率
  PREDICTIVE_EVALUATION_RANKING = 'predictive_evaluation_ranking', // 预判评价排名
}

export interface IPostPredictivePowerDataParamsType extends IFormValue {
  valueType?: INuclearPowerStatusType; // 核电状态
  stationId?: string; // 交易单元
}

export interface IDataListType {
  id?: number | null; //ID
  stationId?: string; //交易单元ID
  stationName?: string; //交易单元名称
  startDate?: string; //【必填】起始日期
  startTime?: string; //【必填】起始时间
  endDate?: string; //【必填】截止日期
  endTime?: string; //【必填】截止时间
  tendingDateTime?: string; //维护时间？ 哪里来的？
  tendingEvent?: string; //检修事件
  tendingUserId?: number; //维护人ID
  tendingUserName?: string; //维护人姓名
  effectCapacity?: number; //影响容量
  planState?: number; //计划状态
}

export enum INuclearPowerStatusType {
  AFTER = 'after', // 核减前：before
  BEFORE = 'before', // 核减后：after
}

export enum IMaintenancePlanModalType {
  ADD = 'add',
  EDIT = 'edit',
}

export enum IFixedPredictivePowerLine {
  CAPACITY = '装机容量', // 装机容量
  AFFECT_CAPACITY = '影响容量', // 影响容量
}

export enum IUseType {
  FIXATION = 'fixation', // 固定值
  DATASOURCE = 'dataSource', // 预测源
}

export enum ISmoothStatusType {
  KALMAN = 'kalman', // MODEL 1
  BEZIER = 'bezier', // MODEL 2
  NONE = 'none', // NONE
}
export interface IFindOperationLogDataType {
  operationTime?: string;
  operationIssue?: string;
  operationUser?: string;
  rateType?: string;
  smoothStatus?: ISmoothStatusType;
  dataList?: IFindOperationLogDataListType[];
  isSpread?: boolean;
  id: number;
}

export interface IFindOperationLogDataListType {
  time?: string;
  useType?: IUseType;
  dataSourceName?: string;
  fixation?: string;
  max?: string;
  min?: string;
  rateValue?: string;
}
export interface IFindOperationLogDataType {
  operationTime?: string;
  operationIssue?: string;
  operationUser?: string;
  rateType?: string;
  smoothStatus?: ISmoothStatusType;
  dataList?: IFindOperationLogDataListType[];
  isSpread?: boolean;
  id: number;
  logId?: number;
}

export type IPredictivePowerDataType = Record<string, Record<string, number>>;

export interface IDeviationDataType {
  timeSlotToDeviationIndexList: Record<string, IIndexListType[]>;
  timeSlotToDeviationPowerList: Record<string, IIndexListType[]>;
}

export interface IIndexListType {
  dataSourceId?: number;
  dataSourceName?: string;
  deviationIndexOptimalFlag?: boolean | null;
  deviationValue?: number;
  timeSlot?: string;
}
